package com.fita.entity.dto.ehi.response;

import java.math.BigDecimal;

/**
 * 
 * @author mohanlan
 *
 */
public class SpecialEquipment {
    
    // type
	private String  type;
    
    // title
	private String title;
	
	// name
	private String name;
	
	// text
	private String content;
	
	private boolean guaranteedInd;
	
	private boolean includedInRate;

    // currencyCode
	private String currencyCode;
    
    // maxCharge
	private BigDecimal maxCharge;
    
    // hourCharge
	private BigDecimal hourCharge;
    
    // dayChagre
	private BigDecimal dayChagre;
    
    // weekCharge
	private BigDecimal weekCharge;
    
    // monthCharge
	private BigDecimal monthCharge;
    
    // rentalPeriodCharge
	private BigDecimal rentalPeriodCharge;

	/**
	 * The default constructor
	 */
	public SpecialEquipment() {
	
	}
	
	/**
	 * 
	 * @param price
	 * @return
	 */
	public boolean isEmptyPrice(BigDecimal price) {
	    if(price == null) {
	        return true;
	    } else {
	        return price.compareTo(BigDecimal.ZERO) == 0;
	    }
	}
	
	/**
	 * 
	 * @return
	 */
	public String getOtherPrice() {
	    String result = "";
	    if(!this.isEmptyPrice(this.hourCharge)) {
            result = result + this.currencyCode + this.hourCharge.toString() + "/每时;";
        }
	    if(!this.isEmptyPrice(this.dayChagre)) {
	        result = result + this.currencyCode + this.dayChagre.toString() + "/每天;";
	    }
	    if(!this.isEmptyPrice(this.weekCharge)) {
            result = result + this.currencyCode + this.weekCharge.toString() + "/每周;";
        }
	    if(!this.isEmptyPrice(this.monthCharge)) {
            result = result + this.currencyCode + this.monthCharge.toString() + "/每月;";
        }
	    if(!this.isEmptyPrice(this.maxCharge)) {
            result = result + this.currencyCode + this.maxCharge.toString() + "/最大;";
        }
	    if(!this.isEmptyPrice(this.rentalPeriodCharge)) {
            result = result + this.currencyCode + this.rentalPeriodCharge.toString() + "/租车期间";
        }
	    return result;
	}

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the content
     */
    public String getContent() {
        return content;
    }

    /**
     * @return the guaranteedInd
     */
    public boolean isGuaranteedInd() {
        return guaranteedInd;
    }

    /**
     * @return the includedInRate
     */
    public boolean isIncludedInRate() {
        return includedInRate;
    }

    /**
     * @return the currencyCode
     */
    public String getCurrencyCode() {
        return currencyCode;
    }

    /**
     * @return the maxCharge
     */
    public BigDecimal getMaxCharge() {
        return maxCharge;
    }

    /**
     * @return the hourCharge
     */
    public BigDecimal getHourCharge() {
        return hourCharge;
    }

    /**
     * @return the dayChagre
     */
    public BigDecimal getDayChagre() {
        return dayChagre;
    }

    /**
     * @return the weekCharge
     */
    public BigDecimal getWeekCharge() {
        return weekCharge;
    }

    /**
     * @return the monthCharge
     */
    public BigDecimal getMonthCharge() {
        return monthCharge;
    }

    /**
     * @return the rentalPeriodCharge
     */
    public BigDecimal getRentalPeriodCharge() {
        return rentalPeriodCharge;
    }

    /**
     * @param type the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @param title the title to set
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param content the content to set
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * @param guaranteedInd the guaranteedInd to set
     */
    public void setGuaranteedInd(boolean guaranteedInd) {
        this.guaranteedInd = guaranteedInd;
    }

    /**
     * @param includedInRate the includedInRate to set
     */
    public void setIncludedInRate(boolean includedInRate) {
        this.includedInRate = includedInRate;
    }

    /**
     * @param currencyCode the currencyCode to set
     */
    public void setCurrencyCode(String currencyCode) {
        this.currencyCode = currencyCode;
    }

    /**
     * @param maxCharge the maxCharge to set
     */
    public void setMaxCharge(BigDecimal maxCharge) {
        this.maxCharge = maxCharge;
    }

    /**
     * @param hourCharge the hourCharge to set
     */
    public void setHourCharge(BigDecimal hourCharge) {
        this.hourCharge = hourCharge;
    }

    /**
     * @param dayChagre the dayChagre to set
     */
    public void setDayChagre(BigDecimal dayChagre) {
        this.dayChagre = dayChagre;
    }

    /**
     * @param weekCharge the weekCharge to set
     */
    public void setWeekCharge(BigDecimal weekCharge) {
        this.weekCharge = weekCharge;
    }

    /**
     * @param monthCharge the monthCharge to set
     */
    public void setMonthCharge(BigDecimal monthCharge) {
        this.monthCharge = monthCharge;
    }

    /**
     * @param rentalPeriodCharge the rentalPeriodCharge to set
     */
    public void setRentalPeriodCharge(BigDecimal rentalPeriodCharge) {
        this.rentalPeriodCharge = rentalPeriodCharge;
    }
}
